<?php

function catched($name,$value=false){

	return F($name,$value,'data/catch');
}

function getCategoryUrl($cid){
	return U('Index/index/category',array('cid'=>$cid));
}

function getSearchAttrValue($avid,$index,$title){
	$s = explode('-', Q('s'));
	$index--;
	
	if($avid==$s[$index]){
		$class = "class='current'";
	}else{
		$class = '';
	}
	$s[$index] = $avid;
	$s = implode('-', $s);
	$url = U('Index/Index/category',array('cid'=>Q('cid'),'s'=>$s));

	
	
	return "<a href='$url' $class>".$title.'</a>';
	
	
}
